class Student:
    def __init__(self,id,score,quality_score) -> None:
        self.id = id
        self.score = score
        self.quality_score = quality_score
        self.comprehensive_score = int(score * 7 + quality_score * 3)

    def total_score(self):
        return self.score + self.quality_score

def is_excellent(ls):
    id,score,quality_score = ls  
    student = Student(id,score,quality_score)
    total_score = student.total_score()
    if student.comprehensive_score >= 800 and total_score > 140:
        print('Excellent')
        
    else:
        print('Not excellent')
        

n = int(input())
ls = []
for i in range(n):
    ls_a = list(map(int,input().split()))
    ls.append(ls_a)

for j in ls:
    is_excellent(j)

